<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/style/global.css" />
<link rel="stylesheet" type="text/css" href="/style/admin.css" />
<script src="/js/xheditor/jquery/jquery-1.4.4.min.js"></script>
<title>问卷管理__修改</title>
</head>

<body>
	<div id="wrap">
    	<div class="m_head">
        	<div class="m_positin">选择问卷</div>
        </div>
        <div class="m_search">
          <form action='' method='post'>
        	问卷分类<select class="select" name="cid">
        		<?php 
        			if(is_array($cate) && count($cate)>0){
        				echo "<option value=0>所有分类</option>";
        				foreach ($cate as $k=>$v){
        		?>
        			<option value="<?php echo $k?>" <?php if($k==$cid)echo 'selected';?>><?php echo $v?></option>
        		<?php 
        				}
        			}
        		?>
        	</select> 
        	科室<select class="select" name="did">
        		<?php 
        			if(is_array($dep) && count($dep)>0){
        				echo "<option value=0>所有科室</option>";
        				foreach ($dep as $k=>$v){
        		?>
        			<option value="<?php echo $k?>" <?php if($k==$did)echo 'selected';?>><?php echo $v?></option>
        		<?php 
        				}
        			}
        		?>
        	</select> 
        	问卷标题<input class="qf_text" name="title" type="text" value="<?php echo $title;?>"/> 
        	<input class="btn_search" name="sub_sel" type="submit" value=''/>
          </form>
        </div>
        <div class="m_content">
        	<table class="qi_table" width="0" border="0" cellpadding="0" cellspacing="1">
              <tr><th ></th><th width="35%">问卷标题</th><th>开始时间</th><th>结束时间</th><th>分类</th><th>科室</th></tr>
              <?php 
              	if(is_array($allquesnr) && count($allquesnr)>0){
              		foreach ($allquesnr as $v){
              ?>
                <tr>
              		<td><input name="quesnr" type="radio" value="<?php echo $v['QUES_ID']?>" /></td>
              		<td><a target='_blank' title="查看问卷" href="/index.php?c=quesnr&a=showquest&look=1&id=<?php echo $v['QUES_ID']?>"><?php echo str_replace($title, '<font color=red><b>'.$title.'</b></font>&nbsp;', $v['TITLE'])?></a></td>
              		<td><?php echo $v['START_TIME']?></td>
              		<td><?php echo $v['END_TIME']?></td>
              		<td><?php echo $cate[$v['CAT']]?></td>
              		<td><?php echo $dep[$v['DEP_ID']]?></td>
              	</tr>
              <?php 
              		}
              	}else{
              ?>
              <tr height='40'><td colspan='10' style='color:green'>没有您要查询的结果</td></tr>
              <?php }?>
              <tr><td colspan='10'>
					<?php 
						$url = '/index.php?c=visitrule&a=sys&p=_num_&did='.$did.'&cid='.$cid.'&title='.$title;
						echo JYTools::pager($url,$tolNum,$page,$pagesize);
					?>
			  </td></tr>
              <tr><td colspan="10"><input class="btn_save" name="" type="button" value="" onclick="goback();" /></td></tr>
            </table>
        </div>
    </div>
</script>
</body>
</html>
<script src="/js/boot.js" type="text/javascript"></script>
<script src="/js/tip.js" type="text/javascript"></script>
<script type='text/javascript'>
function goback(){
	if($("input:checked").val()){
		var backurl = T.getCookie('back_visitrule_edit');
		backurl += '&qid='+$("input:checked").val();
		T.delCookie('back_visitrule_edit');
		location.href=backurl;
	}else{
		alert('你没有选中任何问卷')
	}
}
</script>